local miewu = fk.CreateSkill{
    name = "ym1__miewu",
    dynamic_desc = function (self, player, lang)
        local arr = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu") or {"slash","duel"}
        return "你可以将【"..Util.TranslateMapper(arr[1]).."】当【"..Util.TranslateMapper(arr[2]).."】使用。"
    end,
}
Fk:loadTranslationTable{
    ["ym1__miewu"] = "滅忤",
    [":ym1__miewu"] = "你可以将【杀】当【决斗】使用。",
    ["#ym1__miewu"] = "滅忤：你可以将【%arg】当【%arg2】使用",
    ["@ym1__miewu"] = "滅忤",
}
miewu:addEffect("viewas",{
    anim_type = "offensive",
    pattern = ".",
    prompt = function (self, player, selected_cards, selected)
        local name1 = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[1] or "slash"
        local name2 = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[2] or "duel"
        return "#ym1__miewu:::"..name1..":"..name2
    end,
    handly_pile = true,
    card_filter = function(self, player, to_select, selected)
        local name = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[1] or "slash"
        return #selected == 0 and Fk:getCardById(to_select).trueName == name
    end,
    view_as = function(self, player, cards)
        if #cards ~= 1 then return end
        local name = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[2] or "duel"
        local card = Fk:cloneCard(name)
        card.skillName = miewu.name
        card:addSubcard(cards[1])
        return card
    end,
    enabled_at_play = function(self, player)
        local name = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[2] or "duel"
        local card = Fk:cloneCard(name)
        card.skillName = miewu.name
        return player:canUse(card) and not player:prohibitUse(card)
    end,
    enabled_at_response = function(self, player, response)
        if not response then
            local name = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu")[2] or "duel"
            return #player:getViewAsCardNames(miewu.name, {name}) > 0
        end
    end,
})
miewu:addAcquireEffect(function (self, player, is_start)
    local room = player.room
    local arr = type(player:getMark("ym1__miewu")) == "table" and player:getMark("ym1__miewu") or {"slash","duel"}
    room:setPlayerMark(player,"ym1__miewu",arr)
    room:setPlayerMark(player,"@ym1__miewu",table.concat(table.map(arr, Util.TranslateMapper)," "))
end)
miewu:addLoseEffect(function (self, player, is_death)
    player.room:setPlayerMark(player,"@ym1__miewu",0)
end)
return miewu